package com.shd.edanpei.ui.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseViewHolder;
import com.shd.edanpei.R;
import com.shd.edanpei.base.BaseQuickImageAdapter;
import com.shd.edanpei.bean.MenuModel;

/**
 * Created by mc on 2018/10/31.
 * yang-wen-wen
 */

public class MenuAdapter extends BaseQuickImageAdapter<MenuModel.MenuData> {

    public MenuAdapter(Context context, int layoutResId) {
        super(context, layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, MenuModel.MenuData item) {
        helper.setText(R.id.menu_name, item.getMenuName())
                .setImageDrawable(R.id.menu_icon, mContext.getResources().getDrawable(item.getMenuIcon()));
    }

}
